<?php
//header('Content-Type: text/html; charset=utf-8');

$param = "login_username=msander&login_password=032491&ses_short=1";
	$ch=curl_init();
	curl_setopt($ch, CURLOPT_URL, "http://rutracker.org/forum/index.php");
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	curl_setopt($ch, CURLOPT_POST, true);
	curl_setopt($ch, CURLOPT_POSTFIELDS, $param);
	curl_setopt($ch, CURLOPT_COOKIEJAR, $_SERVER['DOCUMENT_ROOT'].'/cookiefile.txt');
	
	$result = curl_exec($ch);
	
    curl_setopt($ch, CURLOPT_URL, "http://rutracker.org/forum/index.php");
	curl_setopt($ch, CURLOPT_POST, false);
	curl_setopt($ch, CURLOPT_COOKIEFILE, $_SERVER['DOCUMENT_ROOT'].'/cookiefile.txt'); 	
	
	$result = curl_exec($ch);

	curl_close($ch);
	echo $result;

?>